.file-management {
  .header-section {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;

    .title-section {
      h2 {
        margin: 0 0 8px 0;
        color: #262626;
        font-size: 24px;
        font-weight: 600;
      }

      p {
        margin: 0;
        color: #8c8c8c;
        font-size: 14px;
      }
    }
  }

  .upload-section {
    margin-bottom: 32px;

    .upload-area {
      width: 100%;
      
      :host ::ng-deep {
        .ant-upload-drag {
          border: 2px dashed #d9d9d9;
          border-radius: 8px;
          background-color: #fafafa;
          transition: all 0.3s;

          &:hover {
            border-color: #1890ff;
            background-color: #f0f8ff;
          }
        }

        .ant-upload-drag-icon {
          margin-bottom: 16px;

          .anticon {
            font-size: 48px;
            color: #1890ff;
          }
        }

        .ant-upload-text {
          font-size: 16px;
          color: #595959;
          margin-bottom: 8px;
        }

        .ant-upload-hint {
          font-size: 12px;
          color: #8c8c8c;
        }
      }
    }
  }

  .files-section {
    h3 {
      margin: 0 0 24px 0;
      color: #262626;
      font-size: 18px;
      font-weight: 500;
    }

    .files-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 24px;
    }

    .file-card {
      background: white;
      border: 1px solid #e8e8e8;
      border-radius: 8px;
      overflow: hidden;
      transition: all 0.3s;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

      &:hover {
        border-color: #1890ff;
        box-shadow: 0 4px 16px rgba(24, 144, 255, 0.15);
        transform: translateY(-2px);
      }

      .file-preview {
        height: 160px;
        background: #f8f9fa;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;

        .preview-container {
          width: 100%;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;

          .preview-image {
            max-width: 100%;
            max-height: 100%;
            object-fit: cover;
            cursor: pointer;
            transition: transform 0.3s;

            &:hover {
              transform: scale(1.05);
            }
          }

          &.icon-preview {
            .file-icon {
              font-size: 48px;
              color: #8c8c8c;
            }
          }
        }
      }

      .file-info {
        padding: 16px;

        .file-name {
          margin: 0 0 8px 0;
          font-size: 14px;
          font-weight: 500;
          color: #262626;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .file-details {
          margin: 0 0 8px 0;
          font-size: 12px;
          color: #8c8c8c;
          display: flex;
          gap: 8px;

          .file-size {
            color: #595959;
            font-weight: 500;
          }

          .file-type {
            color: #8c8c8c;
            font-style: italic;
          }
        }

        .file-date {
          margin: 0 0 12px 0;
          font-size: 12px;
          color: #8c8c8c;
        }

        .file-id {
          padding: 8px;
          background: #f6f6f6;
          border-radius: 4px;
          font-size: 12px;
          display: flex;
          align-items: center;
          gap: 4px;

          .id-label {
            color: #8c8c8c;
            flex-shrink: 0;
          }

          .id-value {
            color: #262626;
            font-family: monospace;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
            min-width: 0;
          }

          .copy-btn {
            flex-shrink: 0;
            padding: 0 4px;
            height: auto;
            font-size: 11px;
          }
        }
      }

      .file-actions {
        padding: 12px 16px;
        border-top: 1px solid #f0f0f0;
        background: #fafafa;

        nz-button-group {
          display: flex;
          gap: 8px;
          width: 100%;

          button {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
          }
        }
      }
    }
  }

  // 预览模态框样式
  .preview-modal-content {
    text-align: center;

    .preview-modal-image {
      max-width: 100%;
      max-height: 70vh;
      object-fit: contain;
      border-radius: 4px;
    }
  }

  // 空状态样式
  :host ::ng-deep {
    .ant-empty {
      margin: 60px 0;
    }

    .ant-spin-container {
      min-height: 200px;
    }

    // 按钮样式
    .ant-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    // 模态框样式
    .ant-modal-content {
      border-radius: 8px;
    }

    .ant-modal-header {
      border-radius: 8px 8px 0 0;
    }

    // 确认框样式
    .ant-popover-inner-content {
      padding: 12px 16px;
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .file-management {
    .files-section {
      .files-grid {
        grid-template-columns: 1fr;
      }
    }

    .upload-section {
      :host ::ng-deep {
        .ant-upload-drag-icon {
          .anticon {
            font-size: 36px;
          }
        }

        .ant-upload-text {
          font-size: 14px;
        }
      }
    }
  }
}

@media (max-width: 576px) {
  .file-management {
    .header-section {
      margin-bottom: 24px;
    }

    .upload-section {
      margin-bottom: 24px;
    }

    .files-section {
      .file-card {
        .file-preview {
          height: 120px;
        }

        .file-info {
          padding: 12px;

          .file-id {
            .id-value {
              font-size: 10px;
            }
          }
        }

        .file-actions {
          padding: 8px 12px;

          nz-button-group {
            gap: 4px;

            button {
              font-size: 12px;
              padding: 4px 8px;
            }
          }
        }
      }
    }
  }
}
